package com.xinsoft.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xinsoft.entity.po.SysIdentifier;
import com.xinsoft.mapper.SysIdentifierMapper;
import com.xinsoft.service.SysIdentifierService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author xuhb
* @description 针对表【sys_identifier(单据编号设置)】的数据库操作Service实现
* @createDate 2023-04-10 11:34:27
*/
@Service
public class SysIdentifierServiceImpl extends ServiceImpl<SysIdentifierMapper, SysIdentifier> implements SysIdentifierService {


    @Resource
    private SysIdentifierMapper sysIdentifierMapper;

    @Override
    public SysIdentifier getSysIdentifierByCodeType(String codeType) {

        QueryWrapper<SysIdentifier> sysIdentifierQueryWrapper = new QueryWrapper<>();
        sysIdentifierQueryWrapper.eq("codeType",codeType);
        sysIdentifierQueryWrapper.eq("do_delete",0);
        SysIdentifier result = sysIdentifierMapper.selectOne(sysIdentifierQueryWrapper);

        return result;
    }

}






